package br.ucb.gafs.jimagefun;

import java.awt.Image;
import java.awt.Rectangle;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;

import javax.imageio.ImageIO;

public class FunPic {
	private Image image;
	private Double xProp;
	private Double yProp;
	private Double widthProp;
	private Double heightProp;
	private Position position;
	private Gender gender;
	

	public FunPic() {}
	
	public FunPic(InputStream istream, Double prop, Double prop2, Double widthProp,
			Double heightProp, Position position, Gender gender) throws IOException {
		this(ImageIO.read(istream), prop, prop2, widthProp, heightProp, position, gender);
	}
	
	public FunPic(Image image, Double prop, Double prop2, Double widthProp,
			Double heightProp, Position position, Gender gender) {
		this.image = image;
		xProp = prop;
		yProp = prop2;
		this.widthProp = widthProp;
		this.heightProp = heightProp;
		this.position = position;
		this.gender = gender;
	}
	public Image getImage() {
		return image;
	}
	public void setImage(Image image) {
		this.image = image;
	}
	public Double getXProp() {
		return xProp;
	}
	public void setXProp(Double prop) {
		xProp = prop;
	}
	public Double getYProp() {
		return yProp;
	}
	public void setYProp(Double prop) {
		yProp = prop;
	}
	public Double getWidthProp() {
		return widthProp;
	}
	public void setWidthProp(Double widthProp) {
		this.widthProp = widthProp;
	}
	public Double getHeightProp() {
		return heightProp;
	}
	public void setHeightProp(Double heightProp) {
		this.heightProp = heightProp;
	}
	public Position getPosition() {
		return position;
	}
	public void setPosition(Position position) {
		this.position = position;
	}
	
	public Gender getGender() {
		return gender;
	}

	public void setGender(Gender gender) {
		this.gender = gender;
	}

	public void drawIn(Image imagem, List<Rectangle> faces){
		getPosition().drawIn(imagem, faces, this);
	}
}
